<!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
<stack>
<name>in</name>
<id>-1</id>
<cardCount>1</cardCount>
<cardID>2966</cardID>
<listID>4453</listID>
<cantModify><false /></cantModify>
<cantDelete><false /></cantDelete>
<cantAbort><false /></cantAbort>
<cardSize>
<width>256</width>
<height>240</height>
</cardSize>
<script>---------------------------------------------------------------------- Covariation output file printer---- November 1990 by JWBrown---- This stack takes the "matrix" type output files from the-- Covariation stack & prints out the data on single pages that-- can be put together to regenerate the matrix. The only other-- way I know of to deal with the output from long alignments is-- to segment the file into <32000 char bites, & paste them into-- MacDraw text fields (a major headache).--------------------------------------------------------------------on printOut-- constants & starting values definitionsput card field "pagewidth" into pageWidthif pageWidth < 1 thenanswer "Page width must be > 0" with OKexit to hypercardend ifput card field "pageLength" into pageLengthif pageLength < 1 thenanswer "Page length must be > 0" with OKexit to hypercardend ifset the printTextSize to 9set the printTextHeight to 9set the printTextFont to monacoput zero into longestLineput "&&" into EOFput false into finishedput empty into thePageput 1 into startPointput pageWidth into stopPoint-- get filePathanswer file "Print out what file?" of type textput it into filePathif filePath is empty then exit to hypercardopen file filePath-- read the file & parse out the data to the printerput "Printing file...Press command-period to halt" into msgrepeat until finishedset the cursor to busyread from file filePath until returnput it into theLineif theLine is EOF thenprint thePageput empty into thePageif stopPoint >= longestLine then put true into finishedclose file filePathopen file filePathadd pageWidth to startPointadd pageLength to stopPointend ifif the length of theLine > longestLine then put the length of theLine into longestLineput char startPoint to stopPoint of theLine after thePageif the last char of thePage is not return then put return after thePageif the number of lines in thePage >= pageLength thenprint thePageput empty into thePageend ifend repeatput empty into msghide msgend printOut</script>